<template>
    <div class="box">
        <header class="header">
            <van-search show-action placeholder="请输入搜索关键词" @click-input="$router.push('/search')">
                <template #left>
                    <van-icon name="star-o" size="20px" />
                </template>
                <template #action>
                    <van-icon name="friends-o" size="20px" />
                </template>
            </van-search>
        </header>
        <main class="content">
            <van-swipe :autoplay="3000" lazy-render>
                <van-swipe-item v-for="image in images" :key="image">
                    <img :src="image" style="width:100%;height:200px" />
                </van-swipe-item>
            </van-swipe>
            <van-grid>
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
            </van-grid>
            <list />

        </main>
    </div>
</template>

<script setup>
import list from './list.vue'
const images = [
      'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
      'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    ];

</script>